#include <iostream>
#include <sstream>
#include <iomanip>
using namespace std;

short I[] = {0,1,3,6,7,7,8,10,13,14,14,15,17,20,21,21,22,24,27,28,28,29,31,34,35,35,36,38,41,42,42,43,45,48,49,49,
	50,52,55,56,56,57,59,62,63,63,64,66,69,70,70,71,73,76,77,77,78,80,83,84,84,85,87,90,91,91,92,94,97,98,98,
	99,101,104,105,105,106,108,111,112,112,113,115,118,119,119,120,122,125,126,126,127,129,132,133,133,134,136,139,140,140,};

short V[] = {0,0,0,0,1,2,3,4,5,5,5,5,5,5,6,7,8,9,10,10,10,10,10,10,11,12,13,14,15,15,15,15,15,15,16,17,
	18,19,20,20,20,20,20,20,21,22,23,24,25,25,25,25,25,25,26,27,28,29,30,30,30,30,30,30,31,32,33,34,35,35,35,
	35,35,35,36,37,38,39,40,40,40,40,40,40,41,42,43,44,45,45,45,45,45,45,46,47,48,49,50,50,50,};

short X[] = {0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,22,24,26,28,30,33,36,39,42,45,48,51,
	54,57,60,64,65,66,67,68,69,70,71,72,73,75,75,75,75,75,75,75,75,75,75,76,77,78,79,80,81,82,83,84,85,87,89,
	91,93,95,97,99,101,103,105,108,111,114,117,120,123,126,129,132,135,139,140,141,142,143,144,145,146,147,148,150,150,};

short L[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
	32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,50,50,50,50,50,50,50,50,50,50,50,};

short C[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,};


/* main
 *  * */
int main() {
	ios_base::sync_with_stdio(true);
	stringstream oss;
	stringstream iss;
	iss << cin.rdbuf();
	short N;
	iss >> N;
	do{
		oss << N << ": " << I[N] << " i, " << V[N] << " v, " << X[N] << " x, " << L[N] << " l, " << C[N] << " c\n";
		iss >> N;
	}while(iss.fail() == false && N != 0);
	cout << oss.str();
	return 0;
}

